// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_fk;

import android.app.Activity;
import java.util.Stack;

// Referenced classes of package com.nnee.p_fk:
//            ActivityEx, c

public class cls_j
{

    private cls_j()
    {
        a = new Stack();
    }

    public static cls_j a()
    {
        if(b == null)
            b = new cls_j();
        return b;
    }

    public static void d(Activity activity)
    {
        a().b(activity);
    }

    public static void e(Activity activity)
    {
    }

    public static void f(Activity activity)
    {
    }

    public static void g(Activity activity)
    {
    }

    public static void h(Activity activity)
    {
    }

    public static void i(Activity activity)
    {
        a().a(activity);
    }

    public void a(Activity activity)
    {
        if(activity != null)
            a.remove(activity);
    }

    public void b()
    {
        if((Activity)a.lastElement() == null);
    }

    public void b(Activity activity)
    {
        if(activity != null)
            a.add(activity);
    }

    public Activity c()
    {
        return (Activity)a.lastElement();
    }

    public void c(Activity activity)
    {
        do
        {
            if(a.size() <= 0)
                break;
            Activity activity1 = (Activity)a.pop();
            if(activity1 != null && activity1 != activity)
                activity1.finish();
        } while(true);
        b(activity);
    }

    public void d()
    {
        do
        {
            if(a.size() <= 0)
                break;
            Activity activity = (Activity)a.pop();
            if(activity != null)
                activity.finish();
        } while(true);
    }

    public int e()
    {
        return a.size();
    }

    public cls_ActivityEx f()
    {
        cls_ActivityEx activityex;
        if(a.size() > 1)
        	activityex = (cls_ActivityEx)(Activity)a.elementAt(-2 + a.size());
        else
        	activityex = null;
        return activityex;
    }

    public void g()
    {
        for(int k = 0; k < a.size(); k++)
        {
            Activity activity = (Activity)a.get(k);
            if(activity instanceof cls_c)
                ((cls_c)activity).f_();
        }

    }

    private static cls_j b;
    public Stack a;
}
